using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Sybase.IDAL
{
   public interface IDALBase
   {
      /// <summary>
      /// Get connection used.
      /// </summary>
      /// <returns>return current connection</returns>
      IDbConnection GetConnection();

      /// <summary>
      /// Close connection used.
      /// </summary>
      void CloseConnection();

      /// <summary>
      /// Begin transaction.
      /// </summary>
      void BeginTransaction();

      /// <summary>
      /// Commit transaction.
      /// </summary>
      void CommitTransaction();

      /// <summary>
      /// Rollback transaction.
      /// </summary>
      void RollbackTransaction();

      /// <summary>
      /// Set or get autoCloseSession value to decide wheter session will be close automatically or not.
      /// </summary>
      bool AutoCloseSession
      {get;set;}

      /// <summary>
      /// Close session.
      /// </summary>
      void CloseSession();

      /// <summary>
      /// Clear session.
      /// </summary>
      void ClearSession();
   }
}